﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SMSPanasonic
{
    public class AppConfig
    {
        public static string ConnectionString
        {
            get { return Properties.Settings.Default.ConnectionString; }
        }

        public static int BatchSize
        {
            get
            {
                return Convert.ToInt32(Properties.Settings.Default.MTBatchSize);
            }
        }

        public static TimeSpan[] MTAutoSendAt
        {
            get
            {
                string[] strDateTime = Properties.Settings.Default.MTAutoSendAt.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                TimeSpan[] retValue = new TimeSpan[strDateTime.Length];
                for (int i = 0; i < strDateTime.Length; i++)
                    retValue[i] = TimeSpan.Parse(strDateTime[i]);
                return retValue;
            }
        }

        public static string DefaultShortCode
        {
            get { return Properties.Settings.Default.DefaultShortCode; }
        }

        public static int CooperateID
        {
            get { return Properties.Settings.Default.CooperateID; }
        }
    }
}
